{extend name="base/main" /}
{block name="body"}
 
<a href="{:url('Activity/add')}" class="layui-btn">添加配置</a>
 
<div class="layui-form">

  <table class="layui-table">
    <colgroup>
      <col width="150">
      <col width="150">
      <col width="200">
      <col>
    </colgroup>
    <thead>
      <tr>

        <th>编号</th>
        <th>标题</th>
        <th>简介</th>
        <th>图标</th>
        <th>排序</th>
        <th>是否显示</th>
        <th>操作</th>
      </tr> 
    </thead>
    <tbody>
      <?php foreach ($list as $k => $v) { ?>
        <tr>

          <td>{$v.id}</td>
          <td>{$v.title}</td>
          <td>{$v.activity}</td>
          <td><img src="{$v.img}" alt="" width="180" height="80"></td>
          <td>{$v.sort}</td>
          <td>
            <?php if($v['status'] == 1){ ?>
              <i class="layui-icon layui-icon-ok"></i>
            <?php }else{ ?>
              <i class="layui-icon layui-icon-close"></i>
            <?php } ?>
          </td>
          <td><a href="{:url('Activity/update',['id'=>$v['id']])}" class="layui-btn layui-btn-xs">编辑</a>
              <a href="{:url('Activity/delete',['id'=>$v['id']])}" onclick="return confirm('确定要删除这条数据吗？');" class="layui-btn layui-btn-xs">删除</a>
          </td>
        </tr>
      <?php } ?>
    </tbody>
  </table>
</div>
{/block}